﻿<style type="text/css">
</style>
<div class="mv-edit validate-area" style="margin-top:10px;">
    <div class="cont-top">
        <span>备注</span>
        <input id="username" type="text" :value="bag.username" class="validate-elem">
    </div>
</div>
<div style="height:60px;"></div>
<script type="text/javascript">
    var pagedata = {
        request: {
            method: "VIEW_FRIEND_DETAILREMARK",
            id: mview.view.chlid.param.id
        },
        screen: {
            header_ok_display: true,
            header_display: true,
            header_title_name: "备注",
            header_exit_name: "返回",
            header_ok_name: '保存',
            header_exit_click: function () {
                mview.view.load('/views/module/friend/detail.html', {
                    id: mview.view.chlid.param.id
                });
            },
            header_ok_click: function () {
                //调用验证表单程序
                mview.view.form.validate("validate-area", function (data) {
                    mview.socket.send({
                        data: {
                            method: "FRIEND_REMARK",
                            id: pagedata.data.bag.id,
                            username: data.username
                        },
                        success: function (data) {
                            if (data.Code == 0) {
                                mview.control.tips("备注成功");
                            }
                            else {
                                mview.control.tips(data.Message);
                            }
                        }
                    });
                });
            },
            header_display: true,
            footer_choose: "user"
        },
        data: {

        },
        methods: {
        }
    }
    mview.view.chlid.init(pagedata);
</script>